package cn.home.service.Impl;

import cn.home.entity.books;
import cn.home.mapper.BooksMapper;
import cn.home.service.BooksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 邹洪辉
 * @version 1.0
 * @date 2023/3/2 - 20:21
 */
@Service
public class BooksServiceImpl implements BooksService {
    @Autowired
    private BooksMapper booksMapper;
    @Override
    public List<books> getAllBooks() {
        return booksMapper.getAllBooks();
    }

    @Override
    public int deleteById(Integer bookId) {
        return booksMapper.deleteById(bookId);
    }

    @Override
    public int updateById(books books) {
        return booksMapper.updateById(books);
    }

    @Override
    public books listById(Integer bookId) {
        return booksMapper.listById(bookId);
    }

    @Override
    public int addBooks(books books) {
        return booksMapper.addBooks(books);
    }
}
